package huixue.cn.com.rxapp.stock.adapter;

import android.content.Context;
import android.view.LayoutInflater;

import java.util.List;

import huixue.cn.com.rxapp.R;
import huixue.cn.com.rxapp.stock.entity.CoinInfo;

/**
 * Created by gongdongyang on 2018/8/16.
 */

public class CoinAdapter extends CommonAdapter<CoinInfo> {

    public CoinAdapter(Context context, List<CoinInfo> mDataList, int mLayoutId) {
        super(context, mDataList, mLayoutId);
    }

    @Override
    public void bindData(CommonViewHolder holder, CoinInfo data) {
        holder.setText(R.id.id_name, data.name)
                .setText(R.id.id_tv_price_last, data.priceLast)
                .setText(R.id.id_tv_rise_rate24, data.riseRate24)
                .setText(R.id.id_tv_vol24, data.vol24)
                .setText(R.id.id_tv_close, data.close)
                .setText(R.id.id_tv_open, data.open)
                .setText(R.id.id_tv_bid, data.bid)
                .setText(R.id.id_tv_ask, data.ask)
                .setText(R.id.id_tv_percent, data.amountPercent);

    }
}
